import urllib
import bs4
import re

from urllib import error, request

url = "https://www.zhihu.com/search?type=content&q=" + urllib.parse.quote("浴缸")
print(url)

req = request.urlopen(url=url)
content = req.read()
bsobj = bs4.BeautifulSoup(content,"html.parser")

answer = bsobj.find_all("li",class_="item clearfix")
answerUrls = []
for item in answer:
	content = item.find("div","entry answer")
	answerUrls.append("https://www.zhihu.com" + content.link["href"])

print(answerUrls)

for answerurl in answerUrls:
	req = request.urlopen(url=answerurl)
	answerContent = req.read()
	tempobj = bs4.BeautifulSoup(answerContent,"html.parser")
	print(tempobj.find("span","RichText CopyrightRichText-richText"))